/*
 * Copyright (c) 2020, chenshuai (cs4380@163.com).
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * https://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.cs.springcloud.admin.api.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cs.springcloud.common.model.BaseModel;
import com.cs.springcloud.common.validate.AddField;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * DictType 数据字典值.
 *
 * @author cs
 * @version 1.0
 * @date 2018年11月29日
 */
@Getter
@Setter
@TableName("base_dict_value")
public class BaseDictValue extends BaseModel implements Serializable {

    private static final long serialVersionUID = 2278534916128410320L;
    /**
     * 主键
     */
    @TableId
    private String id;

    /**
     * 数据字典类型id
     */
    @NotBlank(groups = AddField.class)
    @TableField("type_id")
    private String typeId;

    /**
     * 编码
     */
    @NotBlank(groups = AddField.class)
    @Size(max = 128)
    @TableField("code")
    private String code;

    /**
     * 值
     */
    @Size(min = 1, max = 256)
    @TableField("value")
    private String value;

    /**
     * 英文显示
     */
    @Size(min = 1, max = 256)
    @TableField("label_en_US")
    private String labelEnUs;

    /**
     * 中文显示
     */
    @Size(min = 1, max = 256)
    @TableField("label_zh_CH")
    private String labelZhCh;

    /**
     * 排序
     */
    @TableField("order_num")
    private Integer orderNum;

    /**
     * 是否删除(1:删除|0:未删除)
     */
    @TableField("is_deleted")
    private String isDeleted;
}